<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file = "lianjie.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form name = "fm">
		<table width = "70%" border = "1" cellpadding="3" cellspacing="0">
			<tr>
				<th width = "20%">ISBN</th>
				<th width = "20%">name</th>
				<th width = "20%">author</th>
				<th width = "20%">type</th>
				<th width = "20%">press</th>
				<th width = "20%">surplus</th>
				<th width = "20%">loan</th>
			</tr>
			<%
			
				String all_ISBN = "";
				String all_name = "";
				String all_author = "";
				String all_type = "";
				String all_press = "";
				String all_surplus = "";				
				String all_loan = "";				
				String select_sql = "select * from booksmassage ";
				ResultSet rs1 = stmt.executeQuery(select_sql);
				while(rs1.next()){
					all_ISBN = rs1.getString("ISBN");
					all_name = rs1.getString("name");
					all_author = rs1.getString("author");
					all_type = rs1.getString("type");
					all_press = rs1.getString("press");
					all_surplus = rs1.getString("surplus");
					all_loan = rs1.getString("loan");
			%>
			<tr align = "center">
				<td><%=all_ISBN %></td>
				<td><%=all_name %></td>
				<td><%=all_author %></td>
				<td><%=all_type %></td>
				<td><%=all_press %></td>
				<td><%=all_surplus %></td>
				<td><%=all_loan %></td>
			</tr>
			<%
				}
			%>
		</table>
		<br><br><br>
	<div align = "center">
	
		<input type = "submit" name = "button" value = "返回" onClick = "back_back()" style = "font-size:20px;font-family:'微软雅黑'">
	</div>
	</form>
</body>
<script>
	function back_back(){
		document.fm.action = "teacher.jsp";
	}
</script>
</html>